﻿//5.编写并测试一个函数larger_of()，该函数把两个double类型变量的值替换为较大的值。例如，larger_of(x, y)会把x和y中较大的值重新赋给两个变量。
double larger_of(double* x, double* y);
#include <stdio.h>
int main(void) {
	double x = 2.2;
	double y = 3.2;
	printf("%lf %lf", x, y);
	double a=larger_of(&x, &y);
	printf("%lf %lf", x, y);
	return 0;
}
double larger_of(double* x, double* y) {
	
	return *x = (*y>=*x?*y:*x);
}